<div class="row logindiv">
  <div class="col-md-6 col-lg-offset-3">
    <h3 style="margin-bottom: 40px">尚硅谷电商推荐系统登录</h3>
    <form (ngSubmit)="login()" #loginForm="ngForm">
      <div class="form-group">
        <label for="exampleInputEmail1">登录邮箱</label>
        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="电子邮箱" [(ngModel)]="user.username" name="username" required>
      </div>
      <div class="form-group">
        <label for="exampleInputPassword1">登录密码</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="登录密码" [(ngModel)]="user.password" name="password" required>
      </div>
      <div class="checkbox">
        <label>
          <input type="checkbox"> 记住我
        </label>
      </div>
      <button type="submit" class="btn btn-default" [disabled]="!loginForm.form.valid"><span class="glyphicon glyphicon-upload" aria-hidden="true"></span> 登录</button>

      <div class="alert alert-danger" role="alert" [hidden] = "loginService.data['success']">
        <strong>失败！</strong> {{loginService.data['message']}}
      </div>
    </form>
    <h5><a routerLink="/register" routerLinkActive="active">用户注册</a> | <a routerLink="/forgot" routerLinkActive="active">忘记密码</a></h5>
  </div>

</div>

